#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    bool isSubsequence(string s, string t) {
        int cur = 0, n = s.size();
        if (n == 0) return true;
        for (auto c : t)
        {
            if (s[cur] == c) ++cur;
            if (cur == n) return true;
        }
        return false;
    }
};